﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-trasitional.dtd">
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<link rel="stylesheet" href="/static/css/table.css"
			type="text/css"></link>
		<script type="text/javascript"
			src="/static/javascript/comm/comm.js">
		</script>
		<script src="/static/javascript/jquery-1.7.2.js"></script>
		<!--以下3个js库必须按照顺序引入-->
		<!--vue脚本库-->
		<script type="text/javascript"
				src="/static/js/vue-3.2.4.global.js">
			<!--axios脚本库-->
		</script>
		<script type="text/javascript"
				src="/static/js/axios-0.18.0.min.js">
		</script>
		<!--我们自己封装的axios函数库 -->
		<script type="text/javascript"
				src="/static/js/axios-helper.js">
		</script>
	</head>
	
<script type="text/javascript">
	
	//控件判断不能为空
	function check(){
		if (document.getElementById("thirdKind.thirdKindSaleId").value==""){
			alert("销售责任人编号不能为空!!!");
			return false;
		}
		if(document.getElementById("thirdKind.thirdKindIsRetail").value!="是" && document.getElementById("thirdKind.thirdKindIsRetail").value!="否"){
			alert("零售店 只能填（是/否）!!!");
			return false;
		}
		document.forms[0].submit();
	}

</script>

	<body id="app">
		<form action="third_kind_change_success.html" method="post">
			<table width="100%">
				<tr>
					<td>
						<font color="black">您正在做的业务是：人力资源--客户化设置--人力资源档案管理设置--III级机构设置--III级机构变更
						</font>
					</td>
				</tr>
				<tr>
					<td align="right">
						<input type="button" value="提交"  @click="submit()" class="BUTTON_STYLE1">
						<input type="button" value="返回" class="BUTTON_STYLE1"
							onclick="history.back();">
					</td>
				</tr>
			</table>

			<table width="100%" border="1" cellpadding=0 cellspacing=1
				bordercolorlight=#848284 bordercolordark=#eeeeee
				class="TABLE_STYLE1">
				
				<tr>
					<td width="19%" class="TD_STYLE1">
						I级机构名称
					</td>
					<td width="81%" class="TD_STYLE2">
						<input type="text" disabled="disabled" v-model="configFileThirdKind.firstKindName"/>
					</td>
				</tr>
				<tr>
					<td width="19%" class="TD_STYLE1">
						II级机构名称
					</td>
					<td width="81%" class="TD_STYLE2">
						<input type="text" disabled="disabled" v-model="configFileThirdKind.secondKindName"/>
					</td>
				</tr>
				<tr>
					<td width="19%" class="TD_STYLE1">
						III级机构编号
					</td>
					<td width="81%" class="TD_STYLE2">
						<input type="text" disabled="disabled" v-model="configFileThirdKind.thirdKindId"/>
					</td>
				</tr>
				<tr>
					<td class="TD_STYLE1">
						III级机构名称
					</td>
					<td class="TD_STYLE2">
						<input type="text" disabled="disabled" v-model="configFileThirdKind.thirdKindName"/>
					</td>
				</tr>
				<tr>
					<td class="TD_STYLE1">
						销售责任人编号（多个编号之间请用"半角逗号"加"一个空格"隔开，如", "）
					</td>
					<td class="TD_STYLE2">
						<textarea rows="4" cols="120" v-model="configFileThirdKind.thirdKindSaleId"></textarea>
					</td>
				</tr>
				<tr>
					<td class="TD_STYLE1">
						是否为零售店（是/否）
					</td>
					<td class="TD_STYLE2">
						<input type="text"  v-model="configFileThirdKind.thirdKindIsRetail"/>
			 		</td>
				</tr>
			</table>
		</form>
	</body>
	<script type="module">
		Vue.createApp({
			data(){
				return{
					//单值/修改 对象
					configFileThirdKind: {
						//主键，自动增长列
						ftkid: null,
						//一级机构编号
						firstKindId: null,
						//一级机构名称
						firstKindName: null,
						//二级机构编号
						secondKindId: null,
						//二级机构名称
						secondKindName: null,
						//三级机构编号
						thirdKindId: null,
						//三级机构名称
						thirdKindName: null,
						//三级机构销售责任人编号
						thirdKindSaleId: null,
						//三级机构是否为零售店  （是/否
						thirdKindIsRetail: null
					}
				}
			},
			methods:{
				submit(){
					requestPostman("/configFileThirdKind/save",this.configFileThirdKind).then((data)=>{
						console.info(data);
						if(data.statusCode==1){
							window.location.href="/templates/page/client/third_kind_change_success.html";
						}else{
							alert("修改失败");
						}
					})
				}
			},
			created(){
				requestGet("/configFileThirdKind/queryById",{
					ftkid:sessionStorage.getItem("ftkid")
				}).then((data)=>{
					this.configFileThirdKind=data;
				})
			}
		}).mount("#app");
	</script>
	<script type="text/javascript">

	</script>
</html>

